const express = require("express");
const router = express.Router();
const userInfo_handler = require("../router-handler/userInfo");
const { updateUserInfoRules,updatePasswordRules,avatarValidationRules, validate } = require("../schema/user.js");
router.get("/userInfo", userInfo_handler.getUserInfo);
// 更新用户信息
router.post(
  "/userInfo",
  updateUserInfoRules(),
  validate,
  userInfo_handler.updateUserInfo
);
// 重置密码
router.post('/resetPassword',updatePasswordRules(),validate,userInfo_handler.resetPassword)
// 修改头像
router.post('/updata/avatar',avatarValidationRules(),validate,userInfo_handler.updateAvatar)
module.exports = router;
